package com.example.administrator.testproject.MVP.Adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.example.administrator.testproject.MVP.Base.BaseQuickAdapter;
import com.example.administrator.testproject.MVP.Base.BaseViewHolder;
import com.example.administrator.testproject.MVP.Entity.DetectListItemDto;
import com.example.administrator.testproject.R;

import java.util.List;

/**
 * Created by Administrator on 2016/10/19 0019.
 */

public class RecileAdapter extends BaseQuickAdapter<DetectListItemDto> {

    public RecileAdapter(int layoutResId, List<DetectListItemDto> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, DetectListItemDto item) {
        Glide.with(mContext)
                .load(item.getItemImgUrl())
                .crossFade()
                .placeholder(R.mipmap.ic_launcher)
                .into((ImageView) helper.getView(R.id.imngView2));
        helper.setText(R.id.textView2, item.getTitle());
    }
}
